<template>
  <div>
    {{ title }}
    <el-button text @click="centerDialogVisible = true"
      >Click to open the Dialog</el-button
    >


    <el-dialog
      v-model="centerDialogVisible"
      title="123"
      width="1000px"
      center
    >
      
    </el-dialog>
    <!-- <v-md-editor v-model="text" /> -->
    
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive, toRefs } from "vue";

export default defineComponent({
  name: "Zhu",
  setup() {
    const state = reactive({
      title: "这是猪",
      centerDialogVisible: false,
      text: "# 一级标题\n## 二级标题",
    });
    const handleDialog = () => {
      console.log("打开对话框");
    };
    const save = (text: any, html: any) => {
      console.log("text", text);
      console.log("html", html);
    };
    return {
      ...toRefs(state),
      handleDialog,
      save,
    };
  },
});
</script>

<style scoped>
</style>